(function(){
    class Animal{
        constructor(public name:string,public age:number){
            this.name = name;
            this.age = age;
        }
    }
    class Dog extends Animal{
        bark(){
            console.log(this.name + " is barking");
        }
    }
    let dog = new Dog("Max",3);
    console.log(dog);
    dog.bark();
    class Cat extends Animal{
        meow(){
            console.log(this.name + " is meowing");
        }
    }
    let cat = new Cat("Kitty",2);
    console.log(cat);
    cat.meow();
})()